#ifndef _SKYPLANE_H_
#define _SKYPLANE_H_

#include <string>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <GL/glut.h>
#include <sstream>
#include "Texture.h"
#include <iostream>
#include <fstream>


#pragma once

#ifndef PI
#define PI 3.1415926535897f
#endif
#ifndef DTOR
#define DTOR (PI / 180.0f)
#endif
#ifndef WORD
#define WORD int
#endif
#ifndef DWORD
#define DWORD long
#endif

// struct section
#ifndef _MY_VERTEX_
#define _MY_VERTEX_
typedef struct {
	float x,y,z;
	float u,v;
	DWORD color;
} VERTEX;
#endif


class skyplane
{
private:
	void GenerateDome(float pRadius, float aRadius, int Divisions, float hTile, float vTile);

	VERTEX * vertices;
	WORD * Indices;
	Texture * texture1;
	int NumOfVertices;
	int NumIndices;
	void verticesToFile(VERTEX * vertices, char * filename);
	void textureCoordinatsToFile(VERTEX * vertices, char * filename);
	void indicesToFile(char * filename);

public:
	skyplane(void);
	~skyplane(void);
	void draw();
};

#endif